package ooday01;

public class Student {
    //成员变量
    String name;
    int age;
    String className;
    String stuId;

    void study(){ //        zy.name
        System.out.println(this.name+"正在学习");
    }
    void sayHi(){//                      zy.name             zy.age
        System.out.println("大家好，我是"+this.name+"，我今年"+this.age+"岁了"+
                "，我所在的班级为："+this.className+"，我的学号是："+this.stuId);
    }//                             zy.className                zy.stuId
    void playWith(String anotherName){
        System.out.println(this.name+"正在和"+anotherName+"一起玩...");
    }//                      zy.name

    Student(String name,int age,String className,String stuId){
        this.name=name;
        this.age=age;
        this.className=className;
        this.stuId=stuId;
    }
    Student(){

    }
    Student(String name,int age){
        this.name=name;
        this.age=age;
    }
}


